<template>
  <div id="spu-list">
    <div class="containner mt-20 flex wrap item-start">
      <div>
        <spu v-for="spu in category_spu_list.spuList" :spu="spu" @click.native="spu_clicked(spu)"></spu>
      </div>
    </div>
  </div>
</template>

<script>
  import Spu from '../components/Spu.vue'
  import {
    mapActions,
    mapState
  } from 'vuex'
  export default {
    //注册子组件
    components: {
      'spu': Spu
    },
    computed: {
      ...mapState('product', ['category_spu_list'])
    },
    methods: {
      ...mapActions('product', ['get_category_spu_list'])
    },
    mounted() {
      this.get_category_spu_list();
    }
  }
</script>

<style scoped>
  @import '../assets/css/spu-list.css'
</style>
